home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / PIIGSIncludes / Memory.p < prev    next >
Encoding:
Text File  |  1990-04-03  |  2.9 KB  |  76 lines  |  [TEXT/MPS ]

  1. {********************************************
  2. ; File: Memory.p
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc. 1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************}
  9.  
  10. UNIT MEMORY;
  11. INTERFACE
  12. USES TYPES,MISCTOOL;
  13. CONST
  14.  
  15. { Error Codes }
  16. memErr = $0201;  { unable to allocate block }
  17. emptyErr = $0202;  { illegal operation, empty handle }
  18. notEmptyErr = $0203;  { an empty handle was expected for this operation }
  19. lockErr = $0204;  { illegal operation on a locked block }
  20. purgeErr = $0205;  { attempt to purge an unpurgable block }
  21. handleErr = $0206;  { an invalid handle was given }
  22. idErr = $0207;  { an invalid owner ID was given }
  23. attrErr = $0208;  { operation illegal on block with given attributes }
  24.  
  25. { Handle Attribute Bits }
  26. attrNoPurge = $0000;  { Not purgeable }
  27. attrBank = $0001;  { fixed bank }
  28. attrAddr = $0002;  { fixed address }
  29. attrPage = $0004;  { page aligned }
  30. attrNoSpec = $0008;  { may not use special memory }
  31. attrNoCross = $0010;  { may not cross banks }
  32. attrPurge1 = $0100;  { Purge level 1 }
  33. attrPurge2 = $0200;  { Purge level 2 }
  34. attrPurge3 = $0300;  { Purge level 3 }
  35. attrPurge = $0300;  { test or set both purge bits }
  36. attrHandle = $1000;  { block of master pointers }
  37. attrSystem = $2000;  { system handle }
  38. attrFixed = $4000;  { not movable }
  39. attrLocked = $8000;  { locked }
  40. PROCEDURE AddToOOMQueue ( headerPtr:Ptr)  ;
  41. PROCEDURE BlockMove ( srcPtr:Ptr; dstPtr:Ptr; count:Longint)  ;
  42. PROCEDURE CheckHandle ( theHandle:Handle)  ;
  43. PROCEDURE CompactMem   ;
  44. PROCEDURE DisposeAll ( userID:Integer)  ;
  45. PROCEDURE DisposeHandle ( theHandle:Handle)  ;
  46. FUNCTION FindHandle ( locationPtr:Ptr) : Handle ;
  47. FUNCTION FreeMem  : Longint ;
  48. FUNCTION GetHandleSize ( theHandle:Handle) : Longint ;
  49. PROCEDURE HandToHand ( sourceHandle:Handle; destHandle:Handle; count:Longint)  ;
  50. PROCEDURE HandToPtr ( sourceHandle:Handle; destPtr:Ptr; count:Longint)  ;
  51. PROCEDURE HLock ( theHandle:Handle)  ;
  52. PROCEDURE HLockAll ( userID:Integer)  ;
  53. PROCEDURE HUnlock ( theHandle:Handle)  ;
  54. PROCEDURE HUnlockAll ( userID:Integer)  ;
  55. FUNCTION MaxBlock  : Longint ;
  56. PROCEDURE MMBootInit   ;
  57. PROCEDURE MMReset   ;
  58. PROCEDURE MMShutDown ( userID:Integer)  ;
  59. FUNCTION MMStartUp  : Integer ;
  60. FUNCTION MMStatus  : Boolean ;
  61. FUNCTION MMVersion  : Integer ;
  62. FUNCTION NewHandle ( blockSize:Longint; userID:Integer; attributes:Integer; locationPtr:Ptr) : Handle ;
  63. PROCEDURE PtrToHand ( sourcePtr:Ptr; destHandle:Handle; count:Longint)  ;
  64. PROCEDURE PurgeAll ( userID:Integer)  ;
  65. PROCEDURE PurgeHandle ( theHandle:Handle)  ;
  66. FUNCTION RealFreeMem  : Longint ;
  67. PROCEDURE ReAllocHandle ( blockSize:Longint; userID:Integer; attributes:Integer; locationPtr:Ptr; theHandle:Handle)  ;
  68. PROCEDURE RemoveFromOOMQueue ( headerPtr:Ptr)  ;
  69. PROCEDURE RestoreHandle ( theHandle:Handle)  ;
  70. PROCEDURE SetHandleSize ( newSize:Longint; theHandle:Handle)  ;
  71. PROCEDURE SetPurge ( newPurgeLevel:Integer; theHandle:Handle)  ;
  72. PROCEDURE SetPurgeAll ( newPurgeLevel:Integer; userID:Integer)  ;
  73. FUNCTION TotalMem  : Longint ;
  74. IMPLEMENTATION
  75. END.
  76.